package com.example.lpc_.pojo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * @BelongsProject: second_market
 * @BelongsPackage: com.example.lpc_.pojo.entity
 * @Author: dianye
 * @CreateTime: 2022-10-21  20:54
 * @Description: TODO
 * @Version: 1.0
 */
public class User {
    private Integer id;
    private String username;
    private String password;
    private String nickname;
    /*注册时间*/
   // @JsonFormat(pattern = "yyyy年mm月dd号 HH时mm分ss秒 ",timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date created;
    /*用户权限暂定0为超级管理员,1为用户*/
    private Integer power;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Integer getPower() {
        return power;
    }

    public void setPower(Integer power) {
        this.power = power;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", created=" + created +
                ", power=" + power +
                '}';
    }
}
